const server = require('http').createServer();
const io = require('socket.io')(server);



io.on('connection', client => {
    client.on('event', data => { 
        console.log('userData', data);
    });
    client.on('disconnect', () => { /* … */ });
});

setInterval(() => {
    io.emit('action-start', '321' + Date.now)
}, 1000);


server.listen(3000);
